import {defineStore} from 'pinia'
import {checkImgAndExtract} from '@/utils/check-obj'
import {cloudGeneralObject} from '@/uniCloud-alipay'
import useMainStore from '@/store/main'

const useCommodityStore = defineStore('commodity', () => {
  const mainStore = useMainStore()

  //新建农品
  const fetchAddAction = async (table, data) => (await mainStore.fetchAddAction(table, data)).data.id

  return {fetchAddAction}
})

export default useCommodityStore
